home *** CD-ROM | disk | FTP | other *** search
/ CyberMycha 2004 August / CyberMycha 08-2004 (Poland).bin / Spiderman2 / MainApp.cab / UWindow.u / UWindowWindow_UWindowListBox_ScriptText.TextBuffer < prev    next >
Unknown  |  2004-01-13  |  7.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
100% file data default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 00 00 00 00 00 00 00 | 72 79 2f 2f 3d 3d 3d 3d |........|ry//====|
|00000010| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000020| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000030| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000040| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000050| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 0d 0a 2f 2f 20 55 57 |========|=..// UW|
|00000060| 69 6e 64 6f 77 4c 69 73 | 74 42 6f 78 20 2d 20 61 |indowLis|tBox - a|
|00000070| 20 6c 69 73 74 62 6f 78 | 0d 0a 2f 2f 3d 3d 3d 3d | listbox|..//====|
|00000080| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000090| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000000a0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000000b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000000c0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 0d 0a 63 6c 61 73 73 |========|=..class|
|000000d0| 20 55 57 69 6e 64 6f 77 | 4c 69 73 74 42 6f 78 20 | UWindow|ListBox |
|000000e0| 65 78 74 65 6e 64 73 20 | 55 57 69 6e 64 6f 77 4c |extends |UWindowL|
|000000f0| 69 73 74 43 6f 6e 74 72 | 6f 6c 3b 0d 0a 0d 0a 76 |istContr|ol;....v|
|00000100| 61 72 20 66 6c 6f 61 74 | 09 09 09 09 49 74 65 6d |ar float|....Item|
|00000110| 48 65 69 67 68 74 3b 0d | 0a 76 61 72 20 55 57 69 |Height;.|.var UWi|
|00000120| 6e 64 6f 77 56 53 63 72 | 6f 6c 6c 62 61 72 09 56 |ndowVScr|ollbar.V|
|00000130| 65 72 74 53 42 3b 0d 0a | 76 61 72 20 55 57 69 6e |ertSB;..|var UWin|
|00000140| 64 6f 77 4c 69 73 74 42 | 6f 78 49 74 65 6d 09 53 |dowListB|oxItem.S|
|00000150| 65 6c 65 63 74 65 64 49 | 74 65 6d 3b 0d 0a 0d 0a |electedI|tem;....|
|00000160| 76 61 72 20 62 6f 6f 6c | 09 09 09 09 62 43 61 6e |var bool|....bCan|
|00000170| 44 72 61 67 3b 0d 0a 76 | 61 72 20 62 6f 6f 6c 09 |Drag;..v|ar bool.|
|00000180| 09 09 09 62 43 61 6e 44 | 72 61 67 45 78 74 65 72 |...bCanD|ragExter|
|00000190| 6e 61 6c 3b 0d 0a 76 61 | 72 20 73 74 72 69 6e 67 |nal;..va|r string|
|000001a0| 09 09 09 09 44 65 66 61 | 75 6c 74 48 65 6c 70 54 |....Defa|ultHelpT|
|000001b0| 65 78 74 3b 0d 0a 76 61 | 72 20 62 6f 6f 6c 09 09 |ext;..va|r bool..|
|000001c0| 09 09 62 44 72 61 67 67 | 69 6e 67 3b 0d 0a 76 61 |..bDragg|ing;..va|
|000001d0| 72 20 66 6c 6f 61 74 09 | 09 09 09 44 72 61 67 59 |r float.|...DragY|
|000001e0| 3b 0d 0a 76 61 72 20 55 | 57 69 6e 64 6f 77 4c 69 |;..var U|WindowLi|
|000001f0| 73 74 42 6f 78 09 09 44 | 6f 75 62 6c 65 43 6c 69 |stBox..D|oubleCli|
|00000200| 63 6b 4c 69 73 74 3b 09 | 2f 2f 20 6c 69 73 74 20 |ckList;.|// list |
|00000210| 74 6f 20 73 65 6e 64 20 | 69 74 65 6d 73 20 74 6f |to send |items to|
|00000220| 20 6f 6e 20 64 6f 75 62 | 6c 65 2d 63 6c 69 63 6b | on doub|le-click|
|00000230| 0d 0a 0d 0a 76 61 72 20 | 62 6f 6f 6c 09 09 09 09 |....var |bool....|
|00000240| 62 48 6f 74 54 72 61 63 | 6b 3b 09 2f 2f 20 41 75 |bHotTrac|k;.// Au|
|00000250| 74 6f 20 73 65 6c 65 63 | 74 20 77 68 65 6e 20 74 |to selec|t when t|
|00000260| 68 65 20 6d 6f 75 73 65 | 20 69 73 20 6f 76 65 72 |he mouse| is over|
|00000270| 2e 0d 0a 0d 0a 66 75 6e | 63 74 69 6f 6e 20 43 72 |.....fun|ction Cr|
|00000280| 65 61 74 65 64 28 29 0d | 0a 7b 0d 0a 09 53 75 70 |eated().|.{...Sup|
|00000290| 65 72 2e 43 72 65 61 74 | 65 64 28 29 3b 0d 0a 09 |er.Creat|ed();...|
|000002a0| 56 65 72 74 53 42 20 3d | 20 55 57 69 6e 64 6f 77 |VertSB =| UWindow|
|000002b0| 56 53 63 72 6f 6c 6c 62 | 61 72 28 43 72 65 61 74 |VScrollb|ar(Creat|
|000002c0| 65 57 69 6e 64 6f 77 28 | 63 6c 61 73 73 27 55 57 |eWindow(|class'UW|
|000002d0| 69 6e 64 6f 77 56 53 63 | 72 6f 6c 6c 62 61 72 27 |indowVSc|rollbar'|
|000002e0| 2c 20 57 69 6e 57 69 64 | 74 68 2d 31 32 2c 20 30 |, WinWid|th-12, 0|
|000002f0| 2c 20 31 32 2c 20 57 69 | 6e 48 65 69 67 68 74 29 |, 12, Wi|nHeight)|
|00000300| 29 3b 0d 0a 7d 0d 0a 0d | 0a 66 75 6e 63 74 69 6f |);..}...|.functio|
|00000310| 6e 20 55 57 69 6e 64 6f | 77 4c 69 73 74 42 6f 78 |n UWindo|wListBox|
|00000320| 49 74 65 6d 20 41 64 64 | 49 74 65 6d 28 73 74 72 |Item Add|Item(str|
|00000330| 69 6e 67 20 43 29 0d 0a | 7b 0d 0a 09 6c 6f 63 61 |ing C)..|{...loca|
|00000340| 6c 20 55 57 69 6e 64 6f | 77 4c 69 73 74 42 6f 78 |l UWindo|wListBox|
|00000350| 49 74 65 6d 20 49 3b 0d | 0a 0d 0a 09 49 20 3d 20 |Item I;.|....I = |
|00000360| 55 57 69 6e 64 6f 77 4c | 69 73 74 42 6f 78 49 74 |UWindowL|istBoxIt|
|00000370| 65 6d 28 49 74 65 6d 73 | 2e 41 70 70 65 6e 64 28 |em(Items|.Append(|
|00000380| 4c 69 73 74 43 6c 61 73 | 73 29 29 3b 0d 0a 09 49 |ListClas|s));...I|
|00000390| 2e 43 61 70 74 69 6f 6e | 20 3d 20 63 3b 0d 0a 0d |.Caption| = c;...|
|000003a0| 0a 09 72 65 74 75 72 6e | 20 49 3b 0d 0a 7d 0d 0a |..return| I;..}..|
|000003b0| 0d 0a 0d 0a 66 75 6e 63 | 74 69 6f 6e 20 42 65 66 |....func|tion Bef|
|000003c0| 6f 72 65 50 61 69 6e 74 | 28 43 61 6e 76 61 73 20 |orePaint|(Canvas |
|000003d0| 43 2c 20 66 6c 6f 61 74 | 20 4d 6f 75 73 65 58 2c |C, float| MouseX,|
|000003e0| 20 66 6c 6f 61 74 20 4d | 6f 75 73 65 59 29 0d 0a | float M|ouseY)..|
|000003f0| 7b 0d 0a 09 6c 6f 63 61 | 6c 20 55 57 69 6e 64 6f |{...loca|l UWindo|
|00000400| 77 4c 69 73 74 42 6f 78 | 49 74 65 6d 20 4f 76 65 |wListBox|Item Ove|
|00000410| 72 49 74 65 6d 3b 0d 0a | 09 6c 6f 63 61 6c 20 73 |rItem;..|.local s|
|00000420| 74 72 69 6e 67 20 4e 65 | 77 48 65 6c 70 54 65 78 |tring Ne|wHelpTex|
|00000430| 74 3b 0d 0a 0d 0a 09 56 | 65 72 74 53 42 2e 53 65 |t;.....V|ertSB.Se|
|00000440| 74 52 61 6e 67 65 28 30 | 2c 20 49 74 65 6d 73 2e |tRange(0|, Items.|
|00000450| 43 6f 75 6e 74 53 68 6f | 77 6e 28 29 2c 20 69 6e |CountSho|wn(), in|
|00000460| 74 28 57 69 6e 48 65 69 | 67 68 74 2f 49 74 65 6d |t(WinHei|ght/Item|
|00000470| 48 65 69 67 68 74 29 29 | 3b 0d 0a 0d 0a 09 4e 65 |Height))|;.....Ne|
|00000480| 77 48 65 6c 70 54 65 78 | 74 20 3d 20 44 65 66 61 |wHelpTex|t = Defa|
|00000490| 75 6c 74 48 65 6c 70 54 | 65 78 74 3b 0d 0a 09 69 |ultHelpT|ext;...i|
|000004a0| 66 28 53 65 6c 65 63 74 | 65 64 49 74 65 6d 20 21 |f(Select|edItem !|
|000004b0| 3d 20 4e 6f 6e 65 29 0d | 0a 09 7b 0d 0a 09 09 4f |= None).|..{....O|
|000004c0| 76 65 72 49 74 65 6d 20 | 3d 20 47 65 74 49 74 65 |verItem |= GetIte|
|000004d0| 6d 41 74 28 4d 6f 75 73 | 65 58 2c 20 4d 6f 75 73 |mAt(Mous|eX, Mous|
|000004e0| 65 59 29 3b 0d 0a 09 09 | 69 66 28 4f 76 65 72 49 |eY);....|if(OverI|
|000004f0| 74 65 6d 20 3d 3d 20 53 | 65 6c 65 63 74 65 64 49 |tem == S|electedI|
|00000500| 74 65 6d 20 26 26 20 4f | 76 65 72 49 74 65 6d 2e |tem && O|verItem.|
|00000510| 48 65 6c 70 54 65 78 74 | 20 21 3d 20 22 22 29 0d |HelpText| != "").|
|00000520| 0a 09 09 09 4e 65 77 48 | 65 6c 70 54 65 78 74 20 |....NewH|elpText |
|00000530| 3d 20 4f 76 65 72 49 74 | 65 6d 2e 48 65 6c 70 54 |= OverIt|em.HelpT|
|00000540| 65 78 74 3b 0d 0a 09 7d | 0d 0a 09 0d 0a 09 69 66 |ext;...}|......if|
|00000550| 28 4e 65 77 48 65 6c 70 | 54 65 78 74 20 21 3d 20 |(NewHelp|Text != |
|00000560| 48 65 6c 70 54 65 78 74 | 29 0d 0a 09 7b 0d 0a 09 |HelpText|)...{...|
|00000570| 09 48 65 6c 70 54 65 78 | 74 20 3d 20 4e 65 77 48 |.HelpTex|t = NewH|
|00000580| 65 6c 70 54 65 78 74 3b | 0d 0a 09 09 4e 6f 74 69 |elpText;|....Noti|
|00000590| 66 79 28 44 45 5f 48 65 | 6c 70 43 68 61 6e 67 65 |fy(DE_He|lpChange|
|000005a0| 64 29 3b 0d 0a 09 7d 0d | 0a 7d 0d 0a 0d 0a 66 75 |d);...}.|.}....fu|
|000005b0| 6e 63 74 69 6f 6e 20 53 | 65 74 48 65 6c 70 54 65 |nction S|etHelpTe|
|000005c0| 78 74 28 73 74 72 69 6e | 67 20 54 29 0d 0a 7b 0d |xt(strin|g T)..{.|
|000005d0| 0a 09 53 75 70 65 72 2e | 53 65 74 48 65 6c 70 54 |..Super.|SetHelpT|
|000005e0| 65 78 74 28 54 29 3b 0d | 0a 09 44 65 66 61 75 6c |ext(T);.|..Defaul|
|000005f0| 74 48 65 6c 70 54 65 78 | 74 20 3d 20 54 3b 0d 0a |tHelpTex|t = T;..|
|00000600| 7d 0d 0a 0d 0a 66 75 6e | 63 74 69 6f 6e 20 53 6f |}....fun|ction So|
|00000610| 72 74 28 29 0d 0a 7b 0d | 0a 09 49 74 65 6d 73 2e |rt()..{.|..Items.|
|00000620| 53 6f 72 74 28 29 3b 0d | 0a 7d 0d 0a 0d 0a 66 75 |Sort();.|.}....fu|
|00000630| 6e 63 74 69 6f 6e 20 50 | 61 69 6e 74 28 43 61 6e |nction P|aint(Can|
|00000640| 76 61 73 20 43 2c 20 66 | 6c 6f 61 74 20 4d 6f 75 |vas C, f|loat Mou|
|00000650| 73 65 58 2c 20 66 6c 6f | 61 74 20 4d 6f 75 73 65 |seX, flo|at Mouse|
|00000660| 59 29 0d 0a 7b 0d 0a 09 | 6c 6f 63 61 6c 20 66 6c |Y)..{...|local fl|
|00000670| 6f 61 74 20 79 3b 0d 0a | 09 6c 6f 63 61 6c 20 55 |oat y;..|.local U|
|00000680| 57 69 6e 64 6f 77 4c 69 | 73 74 20 43 75 72 49 74 |WindowLi|st CurIt|
|00000690| 65 6d 3b 0d 0a 09 6c 6f | 63 61 6c 20 69 6e 74 20 |em;...lo|cal int |
|000006a0| 69 3b 0d 0a 09 6c 6f 63 | 61 6c 20 43 6f 6c 6f 72 |i;...loc|al Color|
|000006b0| 20 4f 6c 64 43 6f 6c 6f | 72 3b 09 0d 0a 09 43 75 | OldColo|r;....Cu|
|000006c0| 72 49 74 65 6d 20 3d 20 | 49 74 65 6d 73 2e 4e 65 |rItem = |Items.Ne|
|000006d0| 78 74 3b 0d 0a 09 69 20 | 3d 20 30 3b 0d 0a 0d 0a |xt;...i |= 0;....|
|000006e0| 09 77 68 69 6c 65 28 28 | 43 75 72 49 74 65 6d 20 |.while((|CurItem |
|000006f0| 21 3d 20 4e 6f 6e 65 29 | 20 26 26 20 28 69 20 3c |!= None)| && (i <|
|00000700| 20 56 65 72 74 53 42 2e | 50 6f 73 29 29 20 0d 0a | VertSB.|Pos)) ..|
|00000710| 09 7b 0d 0a 09 09 69 66 | 28 43 75 72 49 74 65 6d |.{....if|(CurItem|
|00000720| 2e 53 68 6f 77 54 68 69 | 73 49 74 65 6d 28 29 29 |.ShowThi|sItem())|
|00000730| 0d 0a 09 09 09 69 2b 2b | 3b 0d 0a 09 09 43 75 72 |.....i++|;....Cur|
|00000740| 49 74 65 6d 20 3d 20 43 | 75 72 49 74 65 6d 2e 4e |Item = C|urItem.N|
|00000750| 65 78 74 3b 0d 0a 09 7d | 0d 0a 0d 0a 09 66 6f 72 |ext;...}|.....for|
|00000760| 28 79 3d 33 3b 28 79 20 | 3c 20 57 69 6e 48 65 69 |(y=3;(y |< WinHei|
|00000770| 67 68 74 29 20 26 26 20 | 28 43 75 72 49 74 65 6d |ght) && |(CurItem|
|00000780| 20 21 3d 20 4e 6f 6e 65 | 29 3b 43 75 72 49 74 65 | != None|);CurIte|
|00000790| 6d 20 3d 20 43 75 72 49 | 74 65 6d 2e 4e 65 78 74 |m = CurI|tem.Next|
|000007a0| 29 0d 0a 09 7b 0d 0a 09 | 09 69 66 28 43 75 72 49 |)...{...|.if(CurI|
|000007b0| 74 65 6d 2e 53 68 6f 77 | 54 68 69 73 49 74 65 6d |tem.Show|ThisItem|
|000007c0| 28 29 29 0d 0a 09 09 7b | 0d 0a 09 09 09 4f 6c 64 |())....{|.....Old|
|000007d0| 43 6f 6c 6f 72 20 3d 20 | 54 65 78 74 43 6f 6c 6f |Color = |TextColo|
|000007e0| 72 3b 0d 0a 09 09 09 69 | 66 20 28 62 48 6f 74 54 |r;.....i|f (bHotT|
|000007f0| 72 61 63 6b 29 0d 0a 09 | 09 09 7b 0d 0a 09 09 09 |rack)...|..{.....|
|00000800| 09 69 66 20 28 20 28 47 | 65 74 49 74 65 6d 41 74 |.if ( (G|etItemAt|
|00000810| 28 4d 6f 75 73 65 58 2c | 20 4d 6f 75 73 65 59 29 |(MouseX,| MouseY)|
|00000820| 20 3d 3d 20 43 75 72 49 | 74 65 6d 29 20 26 26 20 | == CurI|tem) && |
|00000830| 28 43 75 72 49 74 65 6d | 20 21 3d 20 53 65 6c 65 |(CurItem| != Sele|
|00000840| 63 74 65 64 49 74 65 6d | 29 20 29 0d 0a 09 09 09 |ctedItem|) ).....|
|00000850| 09 7b 0d 0a 09 09 09 09 | 09 54 65 78 74 43 6f 6c |.{......|.TextCol|
|00000860| 6f 72 20 3d 20 53 65 6c | 65 63 74 69 6f 6e 43 6f |or = Sel|ectionCo|
|00000870| 6c 6f 72 3b 0d 0a 09 09 | 09 09 09 54 65 78 74 43 |lor;....|...TextC|
|00000880| 6f 6c 6f 72 2e 52 20 3d | 20 6d 61 78 28 30 2c 54 |olor.R =| max(0,T|
|00000890| 65 78 74 43 6f 6c 6f 72 | 2e 52 2d 39 36 29 3b 20 |extColor|.R-96); |
|000008a0| 0d 0a 09 09 09 09 09 54 | 65 78 74 43 6f 6c 6f 72 |.......T|extColor|
|000008b0| 2e 47 20 3d 20 6d 61 78 | 28 30 2c 54 65 78 74 43 |.G = max|(0,TextC|
|000008c0| 6f 6c 6f 72 2e 47 2d 39 | 36 29 3b 20 0d 0a 09 09 |olor.G-9|6); ....|
|000008d0| 09 09 09 54 65 78 74 43 | 6f 6c 6f 72 2e 42 20 3d |...TextC|olor.B =|
|000008e0| 20 6d 61 78 28 30 2c 54 | 65 78 74 43 6f 6c 6f 72 | max(0,T|extColor|
|000008f0| 2e 42 2d 39 36 29 3b 0d | 0a 09 09 09 09 7d 20 0d |.B-96);.|.....} .|
|00000900| 0a 09 09 09 7d 09 09 09 | 09 0d 0a 09 09 0d 0a 09 |....}...|........|
|00000910| 09 09 69 66 20 28 56 65 | 72 74 53 42 2e 62 57 69 |..if (Ve|rtSB.bWi|
|00000920| 6e 64 6f 77 56 69 73 69 | 62 6c 65 29 0d 0a 09 09 |ndowVisi|ble)....|
|00000930| 09 09 44 72 61 77 49 74 | 65 6d 28 43 2c 20 43 75 |..DrawIt|em(C, Cu|
|00000940| 72 49 74 65 6d 2c 20 35 | 2c 20 79 2c 20 57 69 6e |rItem, 5|, y, Win|
|00000950| 57 69 64 74 68 20 2d 20 | 31 32 2c 20 49 74 65 6d |Width - |12, Item|
|00000960| 48 65 69 67 68 74 29 3b | 0d 0a 09 09 09 65 6c 73 |Height);|.....els|
|00000970| 65 0d 0a 09 09 09 20 20 | 20 20 44 72 61 77 49 74 |e..... | DrawIt|
|00000980| 65 6d 28 43 2c 20 43 75 | 72 49 74 65 6d 2c 20 35 |em(C, Cu|rItem, 5|
|00000990| 2c 20 79 2c 20 57 69 6e | 57 69 64 74 68 2c 20 49 |, y, Win|Width, I|
|000009a0| 74 65 6d 48 65 69 67 68 | 74 29 3b 0d 0a 09 09 09 |temHeigh|t);.....|
|000009b0| 79 20 3d 20 79 20 2b 20 | 49 74 65 6d 48 65 69 67 |y = y + |ItemHeig|
|000009c0| 68 74 3b 0d 0a 09 09 09 | 0d 0a 09 09 09 54 65 78 |ht;.....|.....Tex|
|000009d0| 74 43 6f 6c 6f 72 20 3d | 20 4f 6c 64 43 6f 6c 6f |tColor =| OldColo|
|000009e0| 72 3b 0d 0a 09 09 09 0d | 0a 09 09 7d 0d 0a 09 7d |r;......|...}...}|
|000009f0| 0d 0a 09 0d 0a 09 0d 0a | 7d 0d 0a 0d 0a 66 75 6e |........|}....fun|
|00000a00| 63 74 69 6f 6e 20 52 65 | 73 69 7a 65 64 28 29 0d |ction Re|sized().|
|00000a10| 0a 7b 0d 0a 09 53 75 70 | 65 72 2e 52 65 73 69 7a |.{...Sup|er.Resiz|
|00000a20| 65 64 28 29 3b 0d 0a 0d | 0a 09 56 65 72 74 53 42 |ed();...|..VertSB|
|00000a30| 2e 57 69 6e 4c 65 66 74 | 20 3d 20 57 69 6e 57 69 |.WinLeft| = WinWi|
|00000a40| 64 74 68 2d 31 32 3b 0d | 0a 09 56 65 72 74 53 42 |dth-12;.|..VertSB|
|00000a50| 2e 57 69 6e 54 6f 70 20 | 3d 20 30 3b 0d 0a 09 56 |.WinTop |= 0;...V|
|00000a60| 65 72 74 53 42 2e 53 65 | 74 53 69 7a 65 28 31 32 |ertSB.Se|tSize(12|
|00000a70| 2c 20 57 69 6e 48 65 69 | 67 68 74 29 3b 0d 0a 7d |, WinHei|ght);..}|
|00000a80| 0d 0a 0d 0a 66 75 6e 63 | 74 69 6f 6e 20 55 57 69 |....func|tion UWi|
|00000a90| 6e 64 6f 77 4c 69 73 74 | 42 6f 78 49 74 65 6d 20 |ndowList|BoxItem |
|00000aa0| 47 65 74 49 74 65 6d 41 | 74 28 66 6c 6f 61 74 20 |GetItemA|t(float |
|00000ab0| 4d 6f 75 73 65 58 2c 20 | 66 6c 6f 61 74 20 4d 6f |MouseX, |float Mo|
|00000ac0| 75 73 65 59 29 0d 0a 7b | 0d 0a 09 6c 6f 63 61 6c |useY)..{|...local|
|00000ad0| 20 66 6c 6f 61 74 20 79 | 3b 0d 0a 09 6c 6f 63 61 | float y|;...loca|
|00000ae0| 6c 20 55 57 69 6e 64 6f | 77 4c 69 73 74 20 43 75 |l UWindo|wList Cu|
|00000af0| 72 49 74 65 6d 3b 0d 0a | 09 6c 6f 63 61 6c 20 69 |rItem;..|.local i|
|00000b00| 6e 74 20 69 3b 0d 0a 09 | 0d 0a 09 69 66 28 4d 6f |nt i;...|...if(Mo|
|00000b10| 75 73 65 58 20 3c 20 30 | 20 7c 7c 20 4d 6f 75 73 |useX < 0| || Mous|
|00000b20| 65 58 20 3e 20 57 69 6e | 57 69 64 74 68 29 0d 0a |eX > Win|Width)..|
|00000b30| 09 09 72 65 74 75 72 6e | 20 4e 6f 6e 65 3b 0d 0a |..return| None;..|
|00000b40| 0d 0a 09 43 75 72 49 74 | 65 6d 20 3d 20 49 74 65 |...CurIt|em = Ite|
|00000b50| 6d 73 2e 4e 65 78 74 3b | 0d 0a 09 69 20 3d 20 30 |ms.Next;|...i = 0|
|00000b60| 3b 0d 0a 0d 0a 09 77 68 | 69 6c 65 28 28 43 75 72 |;.....wh|ile((Cur|
|00000b70| 49 74 65 6d 20 21 3d 20 | 4e 6f 6e 65 29 20 26 26 |Item != |None) &&|
|00000b80| 20 28 69 20 3c 20 56 65 | 72 74 53 42 2e 50 6f 73 | (i < Ve|rtSB.Pos|
|00000b90| 29 29 20 0d 0a 09 7b 0d | 0a 09 09 69 66 28 43 75 |)) ...{.|...if(Cu|
|00000ba0| 72 49 74 65 6d 2e 53 68 | 6f 77 54 68 69 73 49 74 |rItem.Sh|owThisIt|
|00000bb0| 65 6d 28 29 29 0d 0a 09 | 09 09 69 2b 2b 3b 0d 0a |em())...|..i++;..|
|00000bc0| 09 09 43 75 72 49 74 65 | 6d 20 3d 20 43 75 72 49 |..CurIte|m = CurI|
|00000bd0| 74 65 6d 2e 4e 65 78 74 | 3b 0d 0a 09 7d 0d 0a 0d |tem.Next|;...}...|
|00000be0| 0a 09 66 6f 72 28 79 3d | 30 3b 28 79 20 3c 20 57 |..for(y=|0;(y < W|
|00000bf0| 69 6e 48 65 69 67 68 74 | 29 20 26 26 20 28 43 75 |inHeight|) && (Cu|
|00000c00| 72 49 74 65 6d 20 21 3d | 20 4e 6f 6e 65 29 3b 43 |rItem !=| None);C|
|00000c10| 75 72 49 74 65 6d 20 3d | 20 43 75 72 49 74 65 6d |urItem =| CurItem|
|00000c20| 2e 4e 65 78 74 29 0d 0a | 09 7b 0d 0a 09 09 69 66 |.Next)..|.{....if|
|00000c30| 28 43 75 72 49 74 65 6d | 2e 53 68 6f 77 54 68 69 |(CurItem|.ShowThi|
|00000c40| 73 49 74 65 6d 28 29 29 | 0d 0a 09 09 7b 0d 0a 09 |sItem())|....{...|
|00000c50| 09 09 69 66 28 4d 6f 75 | 73 65 59 20 3e 3d 20 79 |..if(Mou|seY >= y|
|00000c60| 20 26 26 20 4d 6f 75 73 | 65 59 20 3c 3d 20 79 2b | && Mous|eY <= y+|
|00000c70| 49 74 65 6d 48 65 69 67 | 68 74 29 0d 0a 09 09 09 |ItemHeig|ht).....|
|00000c80| 09 72 65 74 75 72 6e 20 | 55 57 69 6e 64 6f 77 4c |.return |UWindowL|
|00000c90| 69 73 74 42 6f 78 49 74 | 65 6d 28 43 75 72 49 74 |istBoxIt|em(CurIt|
|00000ca0| 65 6d 29 3b 0d 0a 09 09 | 09 79 20 3d 20 79 20 2b |em);....|.y = y +|
|00000cb0| 20 49 74 65 6d 48 65 69 | 67 68 74 3b 0d 0a 09 09 | ItemHei|ght;....|
|00000cc0| 7d 0d 0a 09 7d 0d 0a 0d | 0a 09 72 65 74 75 72 6e |}...}...|..return|
|00000cd0| 20 4e 6f 6e 65 3b 0d 0a | 7d 0d 0a 0d 0a 66 75 6e | None;..|}....fun|
|00000ce0| 63 74 69 6f 6e 20 4d 61 | 6b 65 53 65 6c 65 63 74 |ction Ma|keSelect|
|00000cf0| 65 64 56 69 73 69 62 6c | 65 28 29 0d 0a 7b 0d 0a |edVisibl|e()..{..|
|00000d00| 09 6c 6f 63 61 6c 20 55 | 57 69 6e 64 6f 77 4c 69 |.local U|WindowLi|
|00000d10| 73 74 20 43 75 72 49 74 | 65 6d 3b 0d 0a 09 6c 6f |st CurIt|em;...lo|
|00000d20| 63 61 6c 20 69 6e 74 20 | 69 3b 0d 0a 09 0d 0a 09 |cal int |i;......|
|00000d30| 56 65 72 74 53 42 2e 53 | 65 74 52 61 6e 67 65 28 |VertSB.S|etRange(|
|00000d40| 30 2c 20 49 74 65 6d 73 | 2e 43 6f 75 6e 74 53 68 |0, Items|.CountSh|
|00000d50| 6f 77 6e 28 29 2c 20 69 | 6e 74 28 57 69 6e 48 65 |own(), i|nt(WinHe|
|00000d60| 69 67 68 74 2f 49 74 65 | 6d 48 65 69 67 68 74 29 |ight/Ite|mHeight)|
|00000d70| 29 3b 0d 0a 0d 0a 09 69 | 66 28 53 65 6c 65 63 74 |);.....i|f(Select|
|00000d80| 65 64 49 74 65 6d 20 3d | 3d 20 4e 6f 6e 65 29 0d |edItem =|= None).|
|00000d90| 0a 09 09 72 65 74 75 72 | 6e 3b 0d 0a 0d 0a 09 69 |...retur|n;.....i|
|00000da0| 20 3d 20 30 3b 0d 0a 09 | 66 6f 72 28 43 75 72 49 | = 0;...|for(CurI|
|00000db0| 74 65 6d 3d 49 74 65 6d | 73 2e 4e 65 78 74 3b 20 |tem=Item|s.Next; |
|00000dc0| 43 75 72 49 74 65 6d 20 | 21 3d 20 4e 6f 6e 65 3b |CurItem |!= None;|
|00000dd0| 20 43 75 72 49 74 65 6d | 20 3d 20 43 75 72 49 74 | CurItem| = CurIt|
|00000de0| 65 6d 2e 4e 65 78 74 29 | 0d 0a 09 7b 0d 0a 09 09 |em.Next)|...{....|
|00000df0| 69 66 28 43 75 72 49 74 | 65 6d 20 3d 3d 20 53 65 |if(CurIt|em == Se|
|00000e00| 6c 65 63 74 65 64 49 74 | 65 6d 29 0d 0a 09 09 09 |lectedIt|em).....|
|00000e10| 62 72 65 61 6b 3b 0d 0a | 09 09 69 66 28 43 75 72 |break;..|..if(Cur|
|00000e20| 49 74 65 6d 2e 53 68 6f | 77 54 68 69 73 49 74 65 |Item.Sho|wThisIte|
|00000e30| 6d 28 29 29 0d 0a 09 09 | 09 69 2b 2b 3b 0d 0a 09 |m())....|.i++;...|
|00000e40| 7d 0d 0a 0d 0a 09 56 65 | 72 74 53 42 2e 53 68 6f |}.....Ve|rtSB.Sho|
|00000e50| 77 28 69 29 3b 0d 0a 7d | 0d 0a 0d 0a 66 75 6e 63 |w(i);..}|....func|
|00000e60| 74 69 6f 6e 20 53 65 74 | 53 65 6c 65 63 74 65 64 |tion Set|Selected|
|00000e70| 49 74 65 6d 28 55 57 69 | 6e 64 6f 77 4c 69 73 74 |Item(UWi|ndowList|
|00000e80| 42 6f 78 49 74 65 6d 20 | 4e 65 77 53 65 6c 65 63 |BoxItem |NewSelec|
|00000e90| 74 65 64 29 0d 0a 7b 0d | 0a 09 69 66 28 4e 65 77 |ted)..{.|..if(New|
|00000ea0| 53 65 6c 65 63 74 65 64 | 20 21 3d 20 4e 6f 6e 65 |Selected| != None|
|00000eb0| 20 26 26 20 53 65 6c 65 | 63 74 65 64 49 74 65 6d | && Sele|ctedItem|
|00000ec0| 20 21 3d 20 4e 65 77 53 | 65 6c 65 63 74 65 64 29 | != NewS|elected)|
|00000ed0| 0d 0a 09 7b 0d 0a 09 09 | 69 66 28 53 65 6c 65 63 |...{....|if(Selec|
|00000ee0| 74 65 64 49 74 65 6d 20 | 21 3d 20 4e 6f 6e 65 29 |tedItem |!= None)|
|00000ef0| 0d 0a 09 09 09 53 65 6c | 65 63 74 65 64 49 74 65 |.....Sel|ectedIte|
|00000f00| 6d 2e 62 53 65 6c 65 63 | 74 65 64 20 3d 20 46 61 |m.bSelec|ted = Fa|
|00000f10| 6c 73 65 3b 0d 0a 0d 0a | 09 09 53 65 6c 65 63 74 |lse;....|..Select|
|00000f20| 65 64 49 74 65 6d 20 3d | 20 4e 65 77 53 65 6c 65 |edItem =| NewSele|
|00000f30| 63 74 65 64 3b 0d 0a 0d | 0a 09 09 69 66 28 53 65 |cted;...|...if(Se|
|00000f40| 6c 65 63 74 65 64 49 74 | 65 6d 20 21 3d 20 4e 6f |lectedIt|em != No|
|00000f50| 6e 65 29 0d 0a 09 09 09 | 53 65 6c 65 63 74 65 64 |ne).....|Selected|
|00000f60| 49 74 65 6d 2e 62 53 65 | 6c 65 63 74 65 64 20 3d |Item.bSe|lected =|
|00000f70| 20 54 72 75 65 3b 0d 0a | 09 09 0d 0a 09 09 4e 6f | True;..|......No|
|00000f80| 74 69 66 79 28 44 45 5f | 43 6c 69 63 6b 29 3b 0d |tify(DE_|Click);.|
|00000f90| 0a 09 7d 0d 0a 7d 0d 0a | 0d 0a 66 75 6e 63 74 69 |..}..}..|..functi|
|00000fa0| 6f 6e 20 53 65 74 53 65 | 6c 65 63 74 65 64 28 66 |on SetSe|lected(f|
|00000fb0| 6c 6f 61 74 20 58 2c 20 | 66 6c 6f 61 74 20 59 29 |loat X, |float Y)|
|00000fc0| 0d 0a 7b 0d 0a 09 6c 6f | 63 61 6c 20 55 57 69 6e |..{...lo|cal UWin|
|00000fd0| 64 6f 77 4c 69 73 74 42 | 6f 78 49 74 65 6d 20 4e |dowListB|oxItem N|
|00000fe0| 65 77 53 65 6c 65 63 74 | 65 64 3b 0d 0a 0d 0a 09 |ewSelect|ed;.....|
|00000ff0| 4e 65 77 53 65 6c 65 63 | 74 65 64 20 3d 20 47 65 |NewSelec|ted = Ge|
|00001000| 74 49 74 65 6d 41 74 28 | 58 2c 20 59 29 3b 0d 0a |tItemAt(|X, Y);..|
|00001010| 09 53 65 74 53 65 6c 65 | 63 74 65 64 49 74 65 6d |.SetSele|ctedItem|
|00001020| 28 4e 65 77 53 65 6c 65 | 63 74 65 64 29 3b 0d 0a |(NewSele|cted);..|
|00001030| 7d 0d 0a 0d 0a 66 75 6e | 63 74 69 6f 6e 20 4c 4d |}....fun|ction LM|
|00001040| 6f 75 73 65 44 6f 77 6e | 28 66 6c 6f 61 74 20 58 |ouseDown|(float X|
|00001050| 2c 20 66 6c 6f 61 74 20 | 59 29 0d 0a 7b 0d 0a 09 |, float |Y)..{...|
|00001060| 53 75 70 65 72 2e 4c 4d | 6f 75 73 65 44 6f 77 6e |Super.LM|ouseDown|
|00001070| 28 58 2c 20 59 29 3b 0d | 0a 0d 0a 09 53 65 74 53 |(X, Y);.|....SetS|
|00001080| 65 6c 65 63 74 65 64 28 | 58 2c 20 59 29 3b 0d 0a |elected(|X, Y);..|
|00001090| 0d 0a 09 69 66 28 62 43 | 61 6e 44 72 61 67 20 7c |...if(bC|anDrag ||
|000010a0| 7c 20 62 43 61 6e 44 72 | 61 67 45 78 74 65 72 6e || bCanDr|agExtern|
|000010b0| 61 6c 29 0d 0a 09 7b 0d | 0a 09 09 62 44 72 61 67 |al)...{.|...bDrag|
|000010c0| 67 69 6e 67 20 3d 20 54 | 72 75 65 3b 0d 0a 09 09 |ging = T|rue;....|
|000010d0| 52 6f 6f 74 2e 43 61 70 | 74 75 72 65 4d 6f 75 73 |Root.Cap|tureMous|
|000010e0| 65 28 29 3b 0d 0a 09 09 | 44 72 61 67 59 20 3d 20 |e();....|DragY = |
|000010f0| 59 3b 0d 0a 09 7d 0d 0a | 7d 0d 0a 0d 0a 66 75 6e |Y;...}..|}....fun|
|00001100| 63 74 69 6f 6e 20 44 6f | 75 62 6c 65 43 6c 69 63 |ction Do|ubleClic|
|00001110| 6b 28 66 6c 6f 61 74 20 | 58 2c 20 66 6c 6f 61 74 |k(float |X, float|
|00001120| 20 59 29 0d 0a 7b 0d 0a | 09 53 75 70 65 72 2e 44 | Y)..{..|.Super.D|
|00001130| 6f 75 62 6c 65 43 6c 69 | 63 6b 28 58 2c 20 59 29 |oubleCli|ck(X, Y)|
|00001140| 3b 0d 0a 0d 0a 09 69 66 | 28 47 65 74 49 74 65 6d |;.....if|(GetItem|
|00001150| 41 74 28 58 2c 20 59 29 | 20 3d 3d 20 53 65 6c 65 |At(X, Y)| == Sele|
|00001160| 63 74 65 64 49 74 65 6d | 29 0d 0a 09 7b 0d 0a 09 |ctedItem|)...{...|
|00001170| 09 44 6f 75 62 6c 65 43 | 6c 69 63 6b 49 74 65 6d |.DoubleC|lickItem|
|00001180| 28 53 65 6c 65 63 74 65 | 64 49 74 65 6d 29 3b 0d |(Selecte|dItem);.|
|00001190| 0a 09 7d 09 0d 0a 7d 0d | 0a 0d 0a 66 75 6e 63 74 |..}...}.|...funct|
|000011a0| 69 6f 6e 20 52 65 63 65 | 69 76 65 44 6f 75 62 6c |ion Rece|iveDoubl|
|000011b0| 65 43 6c 69 63 6b 49 74 | 65 6d 28 55 57 69 6e 64 |eClickIt|em(UWind|
|000011c0| 6f 77 4c 69 73 74 42 6f | 78 20 4c 2c 20 55 57 69 |owListBo|x L, UWi|
|000011d0| 6e 64 6f 77 4c 69 73 74 | 42 6f 78 49 74 65 6d 20 |ndowList|BoxItem |
|000011e0| 49 29 0d 0a 7b 0d 0a 09 | 49 2e 52 65 6d 6f 76 65 |I)..{...|I.Remove|
|000011f0| 28 29 3b 0d 0a 09 49 74 | 65 6d 73 2e 41 70 70 65 |();...It|ems.Appe|
|00001200| 6e 64 49 74 65 6d 28 49 | 29 3b 0d 0a 09 53 65 74 |ndItem(I|);...Set|
|00001210| 53 65 6c 65 63 74 65 64 | 49 74 65 6d 28 49 29 3b |Selected|Item(I);|
|00001220| 0d 0a 09 4c 2e 53 65 6c | 65 63 74 65 64 49 74 65 |...L.Sel|ectedIte|
|00001230| 6d 20 3d 20 4e 6f 6e 65 | 3b 0d 0a 09 4c 2e 4e 6f |m = None|;...L.No|
|00001240| 74 69 66 79 28 44 45 5f | 43 68 61 6e 67 65 29 3b |tify(DE_|Change);|
|00001250| 0d 0a 09 4e 6f 74 69 66 | 79 28 44 45 5f 43 68 61 |...Notif|y(DE_Cha|
|00001260| 6e 67 65 29 3b 0d 0a 7d | 0d 0a 0d 0a 66 75 6e 63 |nge);..}|....func|
|00001270| 74 69 6f 6e 20 44 6f 75 | 62 6c 65 43 6c 69 63 6b |tion Dou|bleClick|
|00001280| 49 74 65 6d 28 55 57 69 | 6e 64 6f 77 4c 69 73 74 |Item(UWi|ndowList|
|00001290| 42 6f 78 49 74 65 6d 20 | 49 29 0d 0a 7b 0d 0a 09 |BoxItem |I)..{...|
|000012a0| 69 66 28 44 6f 75 62 6c | 65 43 6c 69 63 6b 4c 69 |if(Doubl|eClickLi|
|000012b0| 73 74 20 21 3d 20 4e 6f | 6e 65 20 26 26 20 49 20 |st != No|ne && I |
|000012c0| 21 3d 20 4e 6f 6e 65 29 | 0d 0a 09 09 44 6f 75 62 |!= None)|....Doub|
|000012d0| 6c 65 43 6c 69 63 6b 4c | 69 73 74 2e 52 65 63 65 |leClickL|ist.Rece|
|000012e0| 69 76 65 44 6f 75 62 6c | 65 43 6c 69 63 6b 49 74 |iveDoubl|eClickIt|
|000012f0| 65 6d 28 53 65 6c 66 2c | 20 49 29 3b 0d 0a 7d 0d |em(Self,| I);..}.|
|00001300| 0a 0d 0a 66 75 6e 63 74 | 69 6f 6e 20 4d 6f 75 73 |...funct|ion Mous|
|00001310| 65 4d 6f 76 65 28 66 6c | 6f 61 74 20 58 2c 20 66 |eMove(fl|oat X, f|
|00001320| 6c 6f 61 74 20 59 29 0d | 0a 7b 0d 0a 09 6c 6f 63 |loat Y).|.{...loc|
|00001330| 61 6c 20 55 57 69 6e 64 | 6f 77 4c 69 73 74 42 6f |al UWind|owListBo|
|00001340| 78 49 74 65 6d 20 4f 76 | 65 72 49 74 65 6d 3b 0d |xItem Ov|erItem;.|
|00001350| 0a 0d 0a 09 0d 0a 09 53 | 75 70 65 72 2e 4d 6f 75 |.......S|uper.Mou|
|00001360| 73 65 4d 6f 76 65 28 58 | 2c 20 59 29 3b 0d 0a 0d |seMove(X|, Y);...|
|00001370| 0a 09 69 66 28 62 44 72 | 61 67 67 69 6e 67 20 26 |..if(bDr|agging &|
|00001380| 26 20 62 4d 6f 75 73 65 | 44 6f 77 6e 29 0d 0a 09 |& bMouse|Down)...|
|00001390| 7b 0d 0a 09 09 4f 76 65 | 72 49 74 65 6d 20 3d 20 |{....Ove|rItem = |
|000013a0| 47 65 74 49 74 65 6d 41 | 74 28 58 2c 20 59 29 3b |GetItemA|t(X, Y);|
|000013b0| 0d 0a 09 09 69 66 28 62 | 43 61 6e 44 72 61 67 20 |....if(b|CanDrag |
|000013c0| 26 26 20 4f 76 65 72 49 | 74 65 6d 20 21 3d 20 53 |&& OverI|tem != S|
|000013d0| 65 6c 65 63 74 65 64 49 | 74 65 6d 20 26 26 20 4f |electedI|tem && O|
|000013e0| 76 65 72 49 74 65 6d 20 | 21 3d 20 4e 6f 6e 65 20 |verItem |!= None |
|000013f0| 26 26 20 53 65 6c 65 63 | 74 65 64 49 74 65 6d 20 |&& Selec|tedItem |
|00001400| 21 3d 20 4e 6f 6e 65 29 | 0d 0a 09 09 7b 0d 0a 09 |!= None)|....{...|
|00001410| 09 09 53 65 6c 65 63 74 | 65 64 49 74 65 6d 2e 52 |..Select|edItem.R|
|00001420| 65 6d 6f 76 65 28 29 3b | 0d 0a 09 09 09 69 66 28 |emove();|.....if(|
|00001430| 59 20 3c 20 44 72 61 67 | 59 29 0d 0a 09 09 09 09 |Y < Drag|Y)......|
|00001440| 4f 76 65 72 49 74 65 6d | 2e 49 6e 73 65 72 74 49 |OverItem|.InsertI|
|00001450| 74 65 6d 42 65 66 6f 72 | 65 28 53 65 6c 65 63 74 |temBefor|e(Select|
|00001460| 65 64 49 74 65 6d 29 3b | 0d 0a 09 09 09 65 6c 73 |edItem);|.....els|
|00001470| 65 0d 0a 09 09 09 09 4f | 76 65 72 49 74 65 6d 2e |e......O|verItem.|
|00001480| 49 6e 73 65 72 74 49 74 | 65 6d 41 66 74 65 72 28 |InsertIt|emAfter(|
|00001490| 53 65 6c 65 63 74 65 64 | 49 74 65 6d 2c 20 54 72 |Selected|Item, Tr|
|000014a0| 75 65 29 3b 0d 0a 0d 0a | 09 09 09 4e 6f 74 69 66 |ue);....|...Notif|
|000014b0| 79 28 44 45 5f 43 68 61 | 6e 67 65 29 3b 0d 0a 0d |y(DE_Cha|nge);...|
|000014c0| 0a 09 09 09 44 72 61 67 | 59 20 3d 20 59 3b 0d 0a |....Drag|Y = Y;..|
|000014d0| 09 09 7d 0d 0a 09 09 65 | 6c 73 65 0d 0a 09 09 7b |..}....e|lse....{|
|000014e0| 0d 0a 09 09 09 69 66 28 | 62 43 61 6e 44 72 61 67 |.....if(|bCanDrag|
|000014f0| 45 78 74 65 72 6e 61 6c | 20 26 26 20 43 68 65 63 |External| && Chec|
|00001500| 6b 45 78 74 65 72 6e 61 | 6c 44 72 61 67 28 58 2c |kExterna|lDrag(X,|
|00001510| 20 59 29 20 21 3d 20 4e | 6f 6e 65 29 0d 0a 09 09 | Y) != N|one)....|
|00001520| 09 09 62 44 72 61 67 67 | 69 6e 67 20 3d 20 46 61 |..bDragg|ing = Fa|
|00001530| 6c 73 65 3b 0d 0a 09 09 | 7d 0d 0a 09 7d 0d 0a 09 |lse;....|}...}...|
|00001540| 65 6c 73 65 0d 0a 09 09 | 62 44 72 61 67 67 69 6e |else....|bDraggin|
|00001550| 67 20 3d 20 46 61 6c 73 | 65 3b 0d 0a 0d 0a 2f 2f |g = Fals|e;....//|
|00001560| 09 69 66 20 28 62 48 6f | 74 54 72 61 63 6b 29 0d |.if (bHo|tTrack).|
|00001570| 0a 2f 2f 09 7b 0d 0a 2f | 2f 09 09 4f 76 65 72 49 |.//.{../|/..OverI|
|00001580| 74 65 6d 20 3d 20 47 65 | 74 49 74 65 6d 41 74 28 |tem = Ge|tItemAt(|
|00001590| 58 2c 20 59 29 3b 0d 0a | 2f 2f 09 09 53 65 74 53 |X, Y);..|//..SetS|
|000015a0| 65 6c 65 63 74 65 64 49 | 74 65 6d 28 4f 76 65 72 |electedI|tem(Over|
|000015b0| 49 74 65 6d 29 3b 0d 0a | 2f 2f 09 7d 0d 0a 09 09 |Item);..|//.}....|
|000015c0| 0d 0a 7d 0d 0a 0d 0a 66 | 75 6e 63 74 69 6f 6e 20 |..}....f|unction |
|000015d0| 62 6f 6f 6c 20 45 78 74 | 65 72 6e 61 6c 44 72 61 |bool Ext|ernalDra|
|000015e0| 67 4f 76 65 72 28 55 57 | 69 6e 64 6f 77 44 69 61 |gOver(UW|indowDia|
|000015f0| 6c 6f 67 43 6f 6e 74 72 | 6f 6c 20 45 78 74 65 72 |logContr|ol Exter|
|00001600| 6e 61 6c 43 6f 6e 74 72 | 6f 6c 2c 20 66 6c 6f 61 |nalContr|ol, floa|
|00001610| 74 20 58 2c 20 66 6c 6f | 61 74 20 59 29 0d 0a 7b |t X, flo|at Y)..{|
|00001620| 0d 0a 09 6c 6f 63 61 6c | 20 55 57 69 6e 64 6f 77 |...local| UWindow|
|00001630| 4c 69 73 74 42 6f 78 20 | 42 3b 0d 0a 09 6c 6f 63 |ListBox |B;...loc|
|00001640| 61 6c 20 55 57 69 6e 64 | 6f 77 4c 69 73 74 42 6f |al UWind|owListBo|
|00001650| 78 49 74 65 6d 20 4f 76 | 65 72 49 74 65 6d 3b 0d |xItem Ov|erItem;.|
|00001660| 0a 0d 0a 09 2f 2f 20 53 | 75 62 63 6c 61 73 73 20 |....// S|ubclass |
|00001670| 73 68 6f 75 6c 64 20 72 | 65 74 75 72 6e 20 66 61 |should r|eturn fa|
|00001680| 6c 73 65 20 61 6e 64 20 | 6e 6f 74 20 63 61 6c 6c |lse and |not call|
|00001690| 20 74 68 69 73 20 76 65 | 72 73 69 6f 6e 20 69 66 | this ve|rsion if|
|000016a0| 20 74 68 69 73 20 65 78 | 74 65 72 6e 61 6c 0d 0a | this ex|ternal..|
|000016b0| 09 2f 2f 20 64 72 61 67 | 20 73 68 6f 75 6c 64 20 |.// drag| should |
|000016c0| 62 65 20 64 65 6e 69 65 | 64 2e 0d 0a 0d 0a 09 42 |be denie|d......B|
|000016d0| 20 3d 20 55 57 69 6e 64 | 6f 77 4c 69 73 74 42 6f | = UWind|owListBo|
|000016e0| 78 28 45 78 74 65 72 6e | 61 6c 43 6f 6e 74 72 6f |x(Extern|alContro|
|000016f0| 6c 29 3b 0d 0a 09 69 66 | 28 42 20 21 3d 20 4e 6f |l);...if|(B != No|
|00001700| 6e 65 20 26 26 20 42 2e | 53 65 6c 65 63 74 65 64 |ne && B.|Selected|
|00001710| 49 74 65 6d 20 21 3d 20 | 4e 6f 6e 65 29 0d 0a 09 |Item != |None)...|
|00001720| 7b 09 0d 0a 09 09 4f 76 | 65 72 49 74 65 6d 20 3d |{.....Ov|erItem =|
|00001730| 20 47 65 74 49 74 65 6d | 41 74 28 58 2c 20 59 29 | GetItem|At(X, Y)|
|00001740| 3b 0d 0a 0d 0a 09 09 42 | 2e 53 65 6c 65 63 74 65 |;......B|.Selecte|
|00001750| 64 49 74 65 6d 2e 52 65 | 6d 6f 76 65 28 29 3b 0d |dItem.Re|move();.|
|00001760| 0a 09 09 69 66 28 4f 76 | 65 72 49 74 65 6d 20 21 |...if(Ov|erItem !|
|00001770| 3d 20 4e 6f 6e 65 29 0d | 0a 09 09 09 4f 76 65 72 |= None).|....Over|
|00001780| 49 74 65 6d 2e 49 6e 73 | 65 72 74 49 74 65 6d 42 |Item.Ins|ertItemB|
|00001790| 65 66 6f 72 65 28 42 2e | 53 65 6c 65 63 74 65 64 |efore(B.|Selected|
|000017a0| 49 74 65 6d 29 3b 0d 0a | 09 09 65 6c 73 65 0d 0a |Item);..|..else..|
|000017b0| 09 09 09 49 74 65 6d 73 | 2e 41 70 70 65 6e 64 49 |...Items|.AppendI|
|000017c0| 74 65 6d 28 42 2e 53 65 | 6c 65 63 74 65 64 49 74 |tem(B.Se|lectedIt|
|000017d0| 65 6d 29 3b 0d 0a 0d 0a | 09 09 53 65 74 53 65 6c |em);....|..SetSel|
|000017e0| 65 63 74 65 64 49 74 65 | 6d 28 42 2e 53 65 6c 65 |ectedIte|m(B.Sele|
|000017f0| 63 74 65 64 49 74 65 6d | 29 3b 0d 0a 09 09 42 2e |ctedItem|);....B.|
|00001800| 53 65 6c 65 63 74 65 64 | 49 74 65 6d 20 3d 20 4e |Selected|Item = N|
|00001810| 6f 6e 65 3b 0d 0a 09 09 | 42 2e 4e 6f 74 69 66 79 |one;....|B.Notify|
|00001820| 28 44 45 5f 43 68 61 6e | 67 65 29 3b 0d 0a 09 09 |(DE_Chan|ge);....|
|00001830| 4e 6f 74 69 66 79 28 44 | 45 5f 43 68 61 6e 67 65 |Notify(D|E_Change|
|00001840| 29 3b 0d 0a 0d 0a 09 09 | 69 66 28 62 43 61 6e 44 |);......|if(bCanD|
|00001850| 72 61 67 20 7c 7c 20 62 | 43 61 6e 44 72 61 67 45 |rag || b|CanDragE|
|00001860| 78 74 65 72 6e 61 6c 29 | 0d 0a 09 09 7b 0d 0a 09 |xternal)|....{...|
|00001870| 09 09 52 6f 6f 74 2e 43 | 61 6e 63 65 6c 43 61 70 |..Root.C|ancelCap|
|00001880| 74 75 72 65 28 29 3b 0d | 0a 09 09 09 62 44 72 61 |ture();.|....bDra|
|00001890| 67 67 69 6e 67 20 3d 20 | 54 72 75 65 3b 0d 0a 09 |gging = |True;...|
|000018a0| 09 09 62 4d 6f 75 73 65 | 44 6f 77 6e 20 3d 20 54 |..bMouse|Down = T|
|000018b0| 72 75 65 3b 0d 0a 09 09 | 09 52 6f 6f 74 2e 43 61 |rue;....|.Root.Ca|
|000018c0| 70 74 75 72 65 4d 6f 75 | 73 65 28 53 65 6c 66 29 |ptureMou|se(Self)|
|000018d0| 3b 0d 0a 09 09 09 44 72 | 61 67 59 20 3d 20 59 3b |;.....Dr|agY = Y;|
|000018e0| 09 0d 0a 09 09 7d 0d 0a | 0d 0a 09 09 72 65 74 75 |.....}..|....retu|
|000018f0| 72 6e 20 54 72 75 65 3b | 0d 0a 09 7d 0d 0a 0d 0a |rn True;|...}....|
|00001900| 09 72 65 74 75 72 6e 20 | 46 61 6c 73 65 3b 09 0d |.return |False;..|
|00001910| 0a 7d 0d 0a 0d 0a 0d 0a | 66 75 6e 63 74 69 6f 6e |.}......|function|
|00001920| 20 44 72 61 77 49 74 65 | 6d 28 43 61 6e 76 61 73 | DrawIte|m(Canvas|
|00001930| 20 43 2c 20 55 57 69 6e | 64 6f 77 4c 69 73 74 20 | C, UWin|dowList |
|00001940| 49 74 65 6d 2c 20 66 6c | 6f 61 74 20 58 2c 20 66 |Item, fl|oat X, f|
|00001950| 6c 6f 61 74 20 59 2c 20 | 66 6c 6f 61 74 20 57 2c |loat Y, |float W,|
|00001960| 20 66 6c 6f 61 74 20 48 | 29 0d 0a 7b 0d 0a 0d 0a | float H|)..{....|
|00001970| 09 6c 6f 63 61 6c 20 66 | 6c 6f 61 74 20 54 58 2c |.local f|loat TX,|
|00001980| 58 4c 2c 59 4c 3b 0d 0a | 0d 0a 2f 2f 20 40 40 4a |XL,YL;..|..// @@J|
|00001990| 6f 65 20 2d 20 46 69 78 | 65 64 20 74 68 69 73 20 |oe - Fix|ed this |
|000019a0| 74 6f 20 75 73 65 20 74 | 68 65 20 54 65 78 74 43 |to use t|he TextC|
|000019b0| 6f 6c 6f 72 20 61 6e 64 | 20 66 6f 6e 74 73 2e 20 |olor and| fonts. |
|000019c0| 20 4d 75 63 68 20 6e 69 | 63 65 72 20 3a 29 20 0d | Much ni|cer :) .|
|000019d0| 0a 2f 2f 20 20 20 46 49 | 58 4d 45 3a 20 55 70 64 |.// FI|XME: Upd|
|000019e0| 61 74 65 20 74 6f 20 61 | 75 74 6f 2d 73 65 74 20 |ate to a|uto-set |
|000019f0| 74 68 65 20 69 74 65 6d | 20 68 65 69 67 68 74 20 |the item| height |
|00001a00| 09 09 0d 0a 0d 0a 09 0d | 0a 09 69 66 28 55 57 69 |........|..if(UWi|
|00001a10| 6e 64 6f 77 4c 69 73 74 | 42 6f 78 49 74 65 6d 28 |ndowList|BoxItem(|
|00001a20| 49 74 65 6d 29 2e 62 53 | 65 6c 65 63 74 65 64 29 |Item).bS|elected)|
|00001a30| 0d 0a 09 7b 0d 0a 09 09 | 69 66 20 28 21 62 4e 6f |...{....|if (!bNo|
|00001a40| 53 65 6c 65 63 74 69 6f | 6e 42 6f 78 29 0d 0a 09 |Selectio|nBox)...|
|00001a50| 09 7b 0d 0a 09 09 09 43 | 2e 44 72 61 77 43 6f 6c |.{.....C|.DrawCol|
|00001a60| 6f 72 20 3d 20 53 65 6c | 65 63 74 69 6f 6e 42 6b |or = Sel|ectionBk|
|00001a70| 67 43 6f 6c 6f 72 3b 0d | 0a 09 09 09 44 72 61 77 |gColor;.|....Draw|
|00001a80| 53 74 72 65 74 63 68 65 | 64 54 65 78 74 75 72 65 |Stretche|dTexture|
|00001a90| 28 43 2c 20 58 2c 20 59 | 2c 20 57 2c 20 48 2d 31 |(C, X, Y|, W, H-1|
|00001aa0| 2c 20 54 65 78 74 75 72 | 65 27 57 68 69 74 65 54 |, Textur|e'WhiteT|
|00001ab0| 65 78 74 75 72 65 27 29 | 3b 0d 0a 09 09 7d 0d 0a |exture')|;....}..|
|00001ac0| 09 09 43 2e 44 72 61 77 | 43 6f 6c 6f 72 20 3d 20 |..C.Draw|Color = |
|00001ad0| 53 65 6c 65 63 74 69 6f | 6e 43 6f 6c 6f 72 3b 0d |Selectio|nColor;.|
|00001ae0| 0a 09 7d 0d 0a 09 65 6c | 73 65 0d 0a 09 09 43 2e |..}...el|se....C.|
|00001af0| 44 72 61 77 43 6f 6c 6f | 72 20 3d 20 54 65 78 74 |DrawColo|r = Text|
|00001b00| 43 6f 6c 6f 72 3b 0d 0a | 0d 0a 0d 0a 09 43 2e 46 |Color;..|.....C.F|
|00001b10| 6f 6e 74 20 3d 20 52 6f | 6f 74 2e 46 6f 6e 74 73 |ont = Ro|ot.Fonts|
|00001b20| 5b 46 6f 6e 74 5d 3b 0d | 0a 09 43 2e 53 74 72 4c |[Font];.|..C.StrL|
|00001b30| 65 6e 28 55 57 69 6e 64 | 6f 77 4c 69 73 74 42 6f |en(UWind|owListBo|
|00001b40| 78 49 74 65 6d 28 49 74 | 65 6d 29 2e 43 61 70 74 |xItem(It|em).Capt|
|00001b50| 69 6f 6e 2c 58 4c 2c 59 | 4c 29 3b 0d 0a 09 0d 0a |ion,XL,Y|L);.....|
|00001b60| 09 73 77 69 74 63 68 20 | 28 41 6c 69 67 6e 29 0d |.switch |(Align).|
|00001b70| 0a 09 7b 0d 0a 09 09 63 | 61 73 65 20 54 41 5f 4c |..{....c|ase TA_L|
|00001b80| 65 66 74 3a 0d 0a 09 09 | 09 54 58 20 3d 20 58 2b |eft:....|.TX = X+|
|00001b90| 32 3b 0d 0a 09 09 63 61 | 73 65 20 54 41 5f 43 65 |2;....ca|se TA_Ce|
|00001ba0| 6e 74 65 72 3a 0d 0a 09 | 09 09 54 58 20 3d 20 28 |nter:...|..TX = (|
|00001bb0| 57 2d 34 20 2d 20 58 4c | 29 2f 32 3b 0d 0a 09 09 |W-4 - XL|)/2;....|
|00001bc0| 09 62 72 65 61 6b 3b 0d | 0a 09 09 63 61 73 65 20 |.break;.|...case |
|00001bd0| 54 41 5f 52 69 67 68 74 | 3a 0d 0a 09 09 09 54 58 |TA_Right|:.....TX|
|00001be0| 20 3d 20 57 2d 58 4c 20 | 2d 20 57 2d 32 3b 0d 0a | = W-XL |- W-2;..|
|00001bf0| 09 09 09 62 72 65 61 6b | 3b 0d 0a 09 7d 09 0d 0a |...break|;...}...|
|00001c00| 09 0d 0a 09 43 6c 69 70 | 54 65 78 74 28 43 2c 20 |....Clip|Text(C, |
|00001c10| 54 58 2c 20 59 2c 20 55 | 57 69 6e 64 6f 77 4c 69 |TX, Y, U|WindowLi|
|00001c20| 73 74 42 6f 78 49 74 65 | 6d 28 49 74 65 6d 29 2e |stBoxIte|m(Item).|
|00001c30| 43 61 70 74 69 6f 6e 29 | 3b 0d 0a 09 09 0d 0a 7d |Caption)|;......}|
|00001c40| 0d 0a 0d 0a 66 75 6e 63 | 74 69 6f 6e 20 4b 65 79 |....func|tion Key|
|00001c50| 55 70 28 69 6e 74 20 4b | 65 79 2c 20 66 6c 6f 61 |Up(int K|ey, floa|
|00001c60| 74 20 58 2c 20 66 6c 6f | 61 74 20 59 29 0d 0a 7b |t X, flo|at Y)..{|
|00001c70| 0d 0a 09 69 66 20 28 20 | 28 6b 65 79 3d 3d 30 78 |...if ( |(key==0x|
|00001c80| 43 38 29 20 7c 7c 20 28 | 6b 65 79 3d 3d 37 38 29 |C8) || (|key==78)|
|00001c90| 20 29 20 0d 0a 09 7b 0d | 0a 09 09 49 66 20 28 53 | ) ...{.|...If (S|
|00001ca0| 65 6c 65 63 74 65 64 49 | 74 65 6d 2e 50 72 65 76 |electedI|tem.Prev|
|00001cb0| 2e 50 72 65 76 21 3d 4e | 6f 6e 65 29 0d 0a 09 09 |.Prev!=N|one)....|
|00001cc0| 09 53 65 74 53 65 6c 65 | 63 74 65 64 49 74 65 6d |.SetSele|ctedItem|
|00001cd0| 28 55 57 69 6e 64 6f 77 | 4c 69 73 74 42 6f 78 49 |(UWindow|ListBoxI|
|00001ce0| 74 65 6d 28 53 65 6c 65 | 63 74 65 64 49 74 65 6d |tem(Sele|ctedItem|
|00001cf0| 2e 50 72 65 76 29 29 3b | 0d 0a 09 7d 0d 0a 09 65 |.Prev));|...}...e|
|00001d00| 6c 73 65 20 69 66 20 28 | 20 28 6b 65 79 3d 3d 30 |lse if (| (key==0|
|00001d10| 78 43 39 29 20 7c 7c 20 | 28 6b 65 79 3d 3d 38 30 |xC9) || |(key==80|
|00001d20| 29 20 29 0d 0a 09 7b 0d | 0a 09 09 49 66 20 28 53 |) )...{.|...If (S|
|00001d30| 65 6c 65 63 74 65 64 49 | 74 65 6d 2e 4e 65 78 74 |electedI|tem.Next|
|00001d40| 21 3d 4e 6f 6e 65 29 0d | 0a 09 09 09 53 65 74 53 |!=None).|....SetS|
|00001d50| 65 6c 65 63 74 65 64 49 | 74 65 6d 28 55 57 69 6e |electedI|tem(UWin|
|00001d60| 64 6f 77 4c 69 73 74 42 | 6f 78 49 74 65 6d 28 53 |dowListB|oxItem(S|
|00001d70| 65 6c 65 63 74 65 64 49 | 74 65 6d 2e 4e 65 78 74 |electedI|tem.Next|
|00001d80| 29 29 3b 0d 0a 09 7d 0d | 0a 09 65 6c 73 65 20 69 |));...}.|..else i|
|00001d90| 66 20 28 20 28 6b 65 79 | 3d 3d 30 78 43 44 29 20 |f ( (key|==0xCD) |
|00001da0| 7c 7c 20 28 6b 65 79 3d | 3d 30 78 30 64 29 20 29 ||| (key=|=0x0d) )|
|00001db0| 0d 0a 09 7b 0d 0a 09 09 | 69 66 20 28 20 28 4f 77 |...{....|if ( (Ow|
|00001dc0| 6e 65 72 57 69 6e 64 6f | 77 21 3d 4e 6f 6e 65 29 |nerWindo|w!=None)|
|00001dd0| 20 26 26 20 28 4f 77 6e | 65 72 57 69 6e 64 6f 77 | && (Own|erWindow|
|00001de0| 2e 49 73 41 28 27 55 57 | 69 6e 64 6f 77 44 69 61 |.IsA('UW|indowDia|
|00001df0| 6c 6f 67 43 6c 69 65 6e | 74 57 69 6e 64 6f 77 27 |logClien|tWindow'|
|00001e00| 29 29 20 29 0d 0a 09 09 | 7b 0d 0a 09 09 09 55 57 |)) )....|{.....UW|
|00001e10| 69 6e 64 6f 77 44 69 61 | 6c 6f 67 43 6c 69 65 6e |indowDia|logClien|
|00001e20| 74 57 69 6e 64 6f 77 28 | 4f 77 6e 65 72 57 69 6e |tWindow(|OwnerWin|
|00001e30| 64 6f 77 29 2e 4e 6f 74 | 69 66 79 28 73 65 6c 66 |dow).Not|ify(self|
|00001e40| 2c 44 45 5f 43 68 61 6e | 67 65 29 3b 0d 0a 09 09 |,DE_Chan|ge);....|
|00001e50| 7d 0d 0a 09 7d 0d 0a 0d | 0a 09 53 75 70 65 72 2e |}...}...|..Super.|
|00001e60| 4b 65 79 55 70 28 6b 65 | 79 2c 78 2c 79 29 3b 0d |KeyUp(ke|y,x,y);.|
|00001e70| 0a 09 0d 0a 7d 0d 0a 0d | 0a 0d 0a 00 |....}...|.... |
+--------+-------------------------+-------------------------+--------+--------+